<template>
  <div class="alert" v-if="isVisible">
    <div class="alert-content">
      <slot></slot>
    </div>
  </div>
</template>

<script setup lang="ts">
const props = defineProps<{
  visible: boolean
}>()
const isVisible = ref(props.visible)
</script>

<style scoped>
.alert {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #fff;
  border-left: 4px solid #ff4d4f;
  padding: 12px 16px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.alert-content {
  font-size: 14px;
  color: #ff4d4f;
}
</style>